package com.zzy.demo.exception;

import com.zzy.cms.common.exception.PlatformRunTimeException;
import com.zzy.cms.common.reuslt.IResultCode;

/**
 * 异常类
 *
 * @author weiyuan
 * @date 20231226
 */
public class BusinessException extends PlatformRunTimeException {

    private static final long serialVersionUID = 1L;


    private String message;

    public BusinessException(IResultCode iResultCode) {
        super(iResultCode);
        this.message = iResultCode.getMsg();
    }

    public BusinessException(IResultCode iResultCode, String message) {
        super(iResultCode);
        this.message = message;
    }

    public BusinessException(IResultCode result, Throwable e) {
        super(result, e);
        this.message = result.getMsg();
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
